home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / UTIL72 / UTIL72.DEI < prev    next >
Encoding:
Text File  |  1995-10-09  |  7.3 KB  |  177 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     util72.dei - Windows 95 V3 de-installation script for database utilities.
  5.  
  6.   DESCRIPTION
  7.     This script removes the Windows NT database utilities files and
  8.     un-registers the product.
  9.  
  10.   OWNER
  11.     Tony Rodgers
  12.  
  13.   MODIFIED    DD-MMM-YY Reason
  14.   LMurphy     06/20/95 - Modified for Windows 95 and 7.2
  15.   syau        07/01/94 - 7.1.3
  16.   HA!         04/28/94 - 7.1.2 and 3.0.10.2
  17.   Hartenstine 04/21/93 - DESKTOP: Adapt to Windows NT
  18.     trodgers  01-APR-92 Created.
  19. *****************************************************************************/
  20. {
  21.   { doit = execute("%installer_home%\win95.dei"); }
  22.   [
  23.     'UNBOUND_VARIABLE: signal('failure,instantiate(nls("instver_too_early2","The version of the Installer currently running is %%installer_version%%. The product(s) you have chosen to deinstall were installed with a later version of the Installer. Please use a later version of the Installer to deinstall these product(s).")));
  24.   ]
  25.  
  26.   if (doit)
  27.     {
  28.       /**********************************************************************
  29.          Ensure that the necessary environment variables are bound
  30.        **********************************************************************/
  31.  
  32.       {
  33.         rdbms72 = v7_translate("rdbms72");
  34.         {
  35.           if (not(exists(RDBMS72)))
  36.             signal('UNBOUND_ENVIRONMENT_VARIABLE);
  37.         }
  38.           [ 'OS_ERROR: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  39.             'INVALID_FILE_NAME: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  40.             'PERMISSION_DENIED: signal('UNBOUND_ENVIRONMENT_VARIABLE); ]
  41.       }
  42.         [
  43.           'UNBOUND_ENVIRONMENT_VARIABLE:
  44.           {
  45.             variable = "rdbms72";
  46.             information_dialog(instantiate(deinstall_prompt02),
  47.                                instantiate(deinstall_content02),
  48.                                instantiate(deinstall_help02));
  49.             doit = FALSE;
  50.           }
  51.         ]
  52.  
  53.       {
  54.         plsql22 = v7_translate("PLSQL22");
  55.         {
  56.           if (not(exists(plsql22)))
  57.             signal('UNBOUND_ENVIRONMENT_VARIABLE);
  58.         }
  59.           [ 'OS_ERROR: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  60.             'INVALID_FILE_NAME: signal('UNBOUND_ENVIRONMENT_VARIABLE);
  61.             'PERMISSION_DENIED: signal('UNBOUND_ENVIRONMENT_VARIABLE); ]
  62.       }
  63.         [
  64.           'UNBOUND_ENVIRONMENT_VARIABLE:
  65.           {
  66.             variable = "plsql22";
  67.             information_dialog(instantiate(deinstall_prompt02),
  68.                                instantiate(deinstall_content02),
  69.                                instantiate(deinstall_help02));
  70.             doit = FALSE;
  71.           }
  72.         ]
  73.  
  74.       /**********************************************************************
  75.          Bind all NLS deinstall strings here...
  76.        **********************************************************************/
  77.       unregistering = nls("unregistering","Unregistering %%registry_label%%...");
  78.       modifying_config = nls("modifying_config","Modifying Windows 95 Registry...");
  79.       deinst_demo = nls("deinst_demo","Deinstalling %%registry_label%% Demonstration files...");
  80.       deinst_sql = nls("deinst_sql","Deinstalling %%registry_label%% SQL Scripts...");
  81.       deinst_init = nls("deinst_init","Deinstalling ORACLE7 Initialization File...");
  82.       deinst_res = nls("deinst_res","Deinstalling %%registry_label%% Resource Files...");
  83.       deinst_msb = nls("deinst_msb","Deinstalling %%registry_label%% Message Files...");
  84.       deinst_exe = nls("deinst_exe","Deinstalling %%registry_label%% Executables...");
  85.       deinst_dll = nls("deinst_dll","Deinstalling %%registry_label%% DLLs...");
  86.       deinst_script = nls("deinst_script","Deinstalling %%registry_label%% Installation Scripts...");
  87.  
  88.       util72_deinst = instantiate(nls("util72_deinst", "Some %%registry_label%% components are currently running on this machine. Please close these applications before deinstalling %%registry_label%%.
  89.  
  90. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  91.  
  92. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  93.  
  94.       "));
  95.       util72_deinst_term = instantiate(nls("util72_deinst_term", "%%registry_label%% deinstallation terminated."));
  96.       util72_deinst_content = instantiate(nls("util72_deinst_content", "%%registry_label%% Components Running"));
  97.       util72_deinst_help = instantiate(nls("util72_deinst_help", "The Oracle Installer has detected that some %%registry_label%% components are currently running on this machine.  Please close these applications before deinstalling %%registry_label%%.
  98.  
  99. Choose OK after you have closed all Oracle applications and want to resume the deinstallation of %%registry_label%%.
  100.  
  101. Choose CANCEL to terminate the deinstallation of %%registry_label%%.
  102.  
  103.       "));
  104.  
  105.       /* check to see if util72 components are closed */
  106.       done = FALSE;
  107.       while(not(done))
  108.       {
  109.         move_file("%ORACLE_HOME%\bin\sqldba72.exe", "%ORACLE_HOME%\bin\sqldba72.exe");      
  110.         move_file("%ORACLE_HOME%\bin\exp72.exe", "%ORACLE_HOME%\bin\exp72.exe");
  111.         move_file("%ORACLE_HOME%\bin\imp72.exe", "%ORACLE_HOME%\bin\imp72.exe");
  112.         move_file("%ORACLE_HOME%\bin\ocopy72.exe", "%ORACLE_HOME%\bin\ocopy72.exe");
  113.         move_file("%ORACLE_HOME%\bin\sqlldr72.exe", "%ORACLE_HOME%\bin\sqlldr72.exe");
  114.         move_file("%ORACLE_HOME%\bin\tkprof72.exe", "%ORACLE_HOME%\bin\tkprof72.exe");
  115.         move_file("%ORACLE_HOME%\bin\vsrcv.exe", "%ORACLE_HOME%\bin\vsrcv.exe");
  116.         move_file("%ORACLE_HOME%\bin\vsbck.exe", "%ORACLE_HOME%\bin\vsbck.exe");
  117.         done = TRUE;
  118.       }
  119.       [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  120.         {
  121.           information_dialog(instantiate(util72_deinst), util72_deinst_content, instantiate(util72_deinst_help));
  122.         }
  123.         'FILE_NOT_FOUND:
  124.           done = TRUE;
  125.       ]
  126.  
  127.       /**********************************************************************
  128.          Continue with the deinstallation
  129.        **********************************************************************/
  130.  
  131.       if (registered("w95rsf72"))
  132.         {
  133.           dependent = registration("w95rsf72");
  134.           unreference(dependent,current_registry);
  135.           deinstall(dependent);
  136.         }
  137.  
  138.       ui_product(registry_label);
  139.  
  140.       ui_action(instantiate(deinst_demo));
  141.       remove(demo);
  142.  
  143.       ui_action(instantiate(deinst_sql));
  144.       remove(sql);
  145.  
  146.       ui_action(instantiate(deinst_init));
  147.       remove(init);
  148.  
  149.       ui_action(instantiate(deinst_msb));
  150.       remove(msg);
  151.  
  152.       ui_action(instantiate(deinst_exe));
  153.       remove(exec);
  154.  
  155.       ui_action(instantiate(deinst_script));
  156.       remove(deinstl);
  157.  
  158.       ui_action(instantiate(modifying_config));
  159.       modify("ORA_SQLDBA_MODE","",ora_config,(registry_filename(current_registry)));
  160.  
  161.       { unreference(registration("w95po7"), current_registry); }
  162.       [ 'UNREGISTERED_PRODUCT: continue(); ]
  163.  
  164.       if (registered("w95po7"))
  165.       {
  166.         dependent = registration("w95po7");
  167.         unreference(dependent, current_registry);
  168.         deinstall(dependent);
  169.       }
  170.  
  171.       ui_action(instantiate(unregistering));
  172.       unregister(current_registry);
  173.  
  174.       permit_retry_operations = FALSE;
  175.     }
  176. }
  177.